package com.designed.pattern.creational.singleton.enumsingleton;

/**
 * @author yifei
 * @date 2024/3/28
 **/
public enum EnumSingleton {
    INSTANCE;
    public static  EnumSingleton getInstance(){
        return INSTANCE;
    }

    public static void main(String[] args) {
        EnumSingleton e1 = EnumSingleton.getInstance();
        EnumSingleton e2 = EnumSingleton.getInstance();
        System.out.println(e1==e2);
    }

}
